package com.anolesoft.amljmes.test.fenguangyingdu.mapper;

import com.anolesoft.amljmes.test.fenguangyingdu.entity.FabrecordDO;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;

/**
 * @author zhj
 * @date 2021/12/22 9:57
 */
@Mapper
public interface FabrecordMapper {
//    @ResultMap("FabrecordResultMap")
    @Results(id = "FabrecordResultMap", value = {
            @Result(id = true, column = "objuid", property = "objuid", jdbcType = JdbcType.VARCHAR),
            @Result(column = "jixing", property = "jixing", jdbcType = JdbcType.VARCHAR),
            @Result(column = "tuhao", property = "tuhao", jdbcType = JdbcType.VARCHAR),
            @Result(column = "cailiaopaihao", property = "cailiaopaihao", jdbcType = JdbcType.VARCHAR),
            @Result(column = "songjiandanwei", property = "songjiandanwei", jdbcType = JdbcType.VARCHAR),
            @Result(column = "lupihao", property = "lupihao", jdbcType = JdbcType.VARCHAR),
            @Result(column = "jianshu", property = "jianshu", jdbcType = JdbcType.INTEGER),
            @Result(column = "songjiangongxuhao", property = "songjiangongxuhao", jdbcType = JdbcType.VARCHAR),
            @Result(column = "songjiangongxumingcheng", property = "songjiangongxumingcheng", jdbcType = JdbcType.VARCHAR),
            @Result(column = "zhizaojilutiaoma", property = "zhizaojilutiaoma", jdbcType = JdbcType.VARCHAR)
    })
    @Select("select\n" +
            "objuid,\n" +
            "jixing,\n" +
            "tuhao,\n" +
            "cailiaopaihao,\n" +
            "songjiandanwei,\n" +
            "lupihao,\n" +
            "jianshu,\n" +
            "songjiangongxuhao,\n" +
            "songjiangongxumingcheng,\n" +
            "zhizaojilutiaoma\n" +
            "from view_fenguangyingdu_zzjl \n" +
            "where zhizaojilutiaoma = #{zhizaojilutiaoma,jdbcType=VARCHAR}")
    FabrecordDO selectFabrecordByCode(@Param("zhizaojilutiaoma") String zhizaojilutiaoma);
}
